NameError: name 'table' is not defined trying to add numbers over a loop to a string